﻿using Present.Commands.Async;
using Present.Commands.Async.Actions;

namespace Present.Commands.Fluent
{
    public class AsyncCommandBuilder : CommandBuilder<AsyncCommand, object>
    {
        private readonly IAsyncAction action;

        public AsyncCommandBuilder(IAsyncAction asyncAction)
        {
            action = asyncAction;
        }


        public static implicit operator AsyncCommand(AsyncCommandBuilder builder)
        {
            return new AsyncCommand(builder.action);
        }


        protected override AsyncCommand BuildCommand()
        {
            return this;
        }
    }
}